#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/wait.h>

int main()
{
  if(fork() == 0)
  {
    //child
    //exec*
    execl("/usr/bin/python3", "python", "test.py", NULL);
    printf("command end...");
    exit(1);
  }
  //parent
  waitpid(-1, NULL, 0);
  printf("father wait success!\n");
  return 0;
}

    //char* env[] = {
    //  "MYPATH: my way,or no way.",
    //  "MYHOME: the sea is home",
    //  NULL
    //};
    //execle("./myexe", "myexe", NULL, env);

    //execl("/usr/bin/ls", "ls", "-a", "-l", "-n", NULL);
    //char* argv[] = {
    //  "ls",
    //  "-a",
    //  "-l",
    //  "-n",
    //  NULL
    //};
    ////execv("/usr/bin/ls", argv);
    //
    //execlp("ls", "ls", "-a", "-l", "-n", NULL);
    //execvp("ls",argv);
